<h2>DESCRIPTION</h2>

<b>t.rast.accdetect</b> is designed to detect accumulation pattern in 
temporally accumulated space time raster datasets created by
<a href="t.rast.accumulate.html">t.rast.accumulate</a>.

This module's input is a space time raster dataset resulting from 
a <a href="t.rast.accumulate.html">t.rast.accumulate</a> run.
<p>
The <b>start</b> time and the <b>end</b> time of the pattern detection 
process must be set, eg. <b>start="2000-03-01" end="2011-01-01"</b>. 
The <b>start</b> and <b>end</b> time do not need to be the same as for 
the accumulation run that produced the input space time raster dataset. 
In addition a <b>cycle</b>, eg. "8 months", can be specified, that 
defines after which time interval the accumulation pattern detection 
process restarts. The <b>offset</b> option specifies the time that 
should be skipped between two cycles, eg. "4 months". The <b>cycle</b> 
and <b>offset</b> options must be exactly the same that were used in the 
accumulation process that generated the input space time raster dataset, 
otherwise the accumulation pattern detection will produce wrong 
results.
<p>
The <b>minimum</b> and <b>maximum</b> values for the pattern detection 
process can be set either by using space time raster datasets or 
by using fixed values for all raster cells and time steps. 
<p>
Using space time raster datasets allows specifying minimum and maximum 
values for each raster cell and each time step. For example, we want to 
detect the germination (minimum value) and harvesting (maximum value) 
dates for different crops in Germany using the growing-degree-day (GDD) 
method for several years. Different crops may grow in different raster 
cells and change with time because of crop rotation. Hence we need to 
specify different GDD germination/harvesting (minimum/maximum) values 
for different raster cells and different years.
<p>
The raster maps that specify the minimum and maximum values of the 
actual granule will be detected using the following temporal relations: 
equals, during, overlaps, overlapped and contains. First, all maps with 
time stamps <i>equal</i> to the current granule of the input STRDS will be 
detected, the first minimum map and the first maximum map that are 
found will be used as range definitions. If no equal maps are found, then 
maps with a temporal <i>during</i> relation will be detected, then maps 
that temporally <i>overlap</i> the actual granules and finally, maps that 
have a temporal <i>contain</i> relation will be detected. If no maps are 
found or minimum/maximum STRDS are not set, then the <b>range</b> option 
is used, eg. <b>range=480,730</b>.
<p>
The <b>base</b> name of of the generated maps must always be set.
<p>
This module produces two output space time raster datasets: occurrence 
and indicator. The <b>occurrence</b> output STRDS stores the time in 
days from the beginning of a given cycle for each raster cell and time 
step that has a value within the minimum and maximum definition. These 
values can be used to compute the duration of the recognized accumulation 
pattern. 
The <b>indicator</b> output STRDS uses three integer values to mark 
raster cells as beginning, intermediate state or end of an accumulation 
pattern. By default, the module uses 1 to indicate the start, 2 for 
the intermediate state and 3 to mark the end of the accumulation pattern 
in a cycle. These default values can be changed using the <b>staend</b> 
option.

<h2>EXAMPLE</h2>

Please have a look at the <a href="t.rast.accumulate.html">t.rast.accumulate</a> example.

<h2>SEE ALSO</h2>

<em>
<a href="t.rast.accumulate.html">t.rast.accumulate</a>,
<a href="t.rast.aggregate.html">t.rast.aggregate</a>,
<a href="t.rast.mapcalc.html">t.rast.mapcalc</a>,
<a href="t.info.html">t.info</a>,
<a href="r.series.accumulate.html">r.series.accumulate</a>,
<a href="g.region.html">g.region</a>
</em>


<h2>AUTHOR</h2>

S&ouml;ren Gebbert, Th&uuml;nen Institute of Climate-Smart Agriculture


<!--
<p>
<i>Last changed: $Date$</i>
-->
